import request from "@/utils/request";
// 获取列表接口
export function gettaskInfo(params) {
  return request({
    url: "/data",
    method: "GET",
    params: params,
  });
}
// 删除
export function deltaskInfo(id) {
  return request({
    url: `/data/${id}`,
    method: "DELETE",
  });
}
// 搜索
export function searchtaskInfo(value) {
  return request({
    url: `/data/?name=${value}`,
    method: "GET",
  });
}
// 新增
export function addtaskInfo(data) {
  return request({
    url: "/data",
    method: "POST",
    data: data,
  });
}
// 编辑
export function edittaskInfo(data) {
  return request({
    url: `/data/${data.id}`,
    method: "PUT",
    data: data,
  });
}
// 回调
export function gettaskInfoDetail(id) {
  return request({
    url: `/data/${id}`,
    method: "GET",
  });
}
